package br.com.hotstar.model.entity;

import javax.persistence.MappedSuperclass;

@MappedSuperclass
public class EntityBaseCodigo extends EntityId{

	private static final long serialVersionUID = -160489500063921820L;

	private Long codigo;
	
	
	
	public Long getCodigo() {
		return codigo;
	}



	public void setCodigo(Long codigo) {
		this.codigo = codigo;
	}


	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((codigo == null) ? 0 : codigo.hashCode());
		return result;
	}



	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		EntityBaseCodigo other = (EntityBaseCodigo) obj;
		if (codigo == null) {
			if (other.codigo != null)
				return false;
		} else if (!codigo.equals(other.codigo))
			return false;
		return true;
	}



	@Override
	public boolean isPersistent() {
		// TODO Auto-generated method stub
		return true;
	}

}
